package com.example.demo.entity;

import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 对应数据库 student_courses 表
 * 合并版本：保留两个版本的所有必要字段
 */
@Data
public class StudentCourse {
    private Integer id;                     // 选课记录id (INT, 自增主键)
    private String studentId;               // 学生学号 (外键)
    private String courseId;                // 课程id (外键)
    private String enrollmentStatus;        // 选课状态 (ENUM: enrolled, completed, dropped)
    private LocalDate enrollmentDate;       // 选课日期 (DATE)
    private LocalDate completionDate;       // 完成日期（可选）- 来自第二段
    private BigDecimal score;               // 课程成绩 (DECIMAL(5, 2))
    private LocalDateTime createdAt;        // 创建时间 - 来自第一段
    private LocalDateTime updatedAt;        // 更新时间 - 来自第一段

    // 手动添加的getter和setter（如果Lombok不工作）
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getStudentId() {
        return studentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public String getEnrollmentStatus() {
        return enrollmentStatus;
    }

    public void setEnrollmentStatus(String enrollmentStatus) {
        this.enrollmentStatus = enrollmentStatus;
    }

    public LocalDate getEnrollmentDate() {
        return enrollmentDate;
    }

    public void setEnrollmentDate(LocalDate enrollmentDate) {
        this.enrollmentDate = enrollmentDate;
    }

    public LocalDate getCompletionDate() {
        return completionDate;
    }

    public void setCompletionDate(LocalDate completionDate) {
        this.completionDate = completionDate;
    }

    public BigDecimal getScore() {
        return score;
    }

    public void setScore(BigDecimal score) {
        this.score = score;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }
}